import Link from 'next/link'
import { withRouter } from 'next/router'

const Star = ({ router }) => (
  <div style={{ padding: '20px' }}>
    <Link href="/">
      <a>返回首页</a>
    </Link>
    <p>{router.query.name} 要和我单挑</p>
  </div>
)

// 必须要使用 withRouter() 接收
export default withRouter(Star)
